﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Details.aspx.vb" Inherits="myproject.Detail" %>
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="Styles/DetailsStyle.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="gvDetails"
            DataKeyNames="ID" DataSourceID="SqlDataSource1" >
            <Columns>
                <asp:BoundField DataField="AppsName" HeaderText="AppsName" 
                    SortExpression="AppsName" />
                     <asp:BoundField DataField="DevelopedBy" HeaderText="Developed By" 
                    SortExpression="DevelopedBy" />
               
                <asp:BoundField DataField="Descripton" HeaderText="Descripton" 
                    SortExpression="Descripton" />
                     <asp:HyperLinkField DataNavigateUrlFields="Website" 
                    DataNavigateUrlFormatString="{0}" DataTextField="Website" Target="_blank"
                    HeaderText="Website"  SortExpression="Website"/>
               
                <asp:ImageField DataImageUrlField="Picture" HeaderText="picture">
                <ControlStyle Height="400px" Width="300px" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            >
            <Columns>
                <asp:BoundField DataField="CommentTitle" HeaderText="CommentTitle" 
                    SortExpression="CommentTitle" />
                <asp:BoundField DataField="CommentBody" HeaderText="CommentBody" 
                    SortExpression="CommentBody" />
                     <asp:BoundField DataField="Rating" HeaderText="Rating" 
                    SortExpression="Rating" />
            
            </Columns>
        </asp:GridView>

        
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [CommentTitle], [CommentBody],[Rating] FROM [Comments] WHERE ([Picture_fkid] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="Picture_fkid" QueryStringField="ID" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT * FROM [Photo Sharing AppsList] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
    Rating 
        <asp:DropDownList ID="DropDownList1" runat="server">
            <asp:ListItem>1</asp:ListItem>
            <asp:ListItem>2</asp:ListItem>
            <asp:ListItem>3</asp:ListItem>
            <asp:ListItem>4</asp:ListItem>
            <asp:ListItem>5</asp:ListItem>
        </asp:DropDownList>
    </p>
    <p>
        COMMENT</p>
    <p>
        TITLE</p>
    <p>
        <asp:TextBox ID="tb_Title" runat="server"></asp:TextBox>
    </p>
    <p>
        <asp:TextBox ID="tb_Body" runat="server" Height="69px" TextMode="MultiLine" 
            Width="154px"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="btn_comment" runat="server" Text="Save Comment and Rating" />
    </p>
    <p>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" 
            DataSourceID="SqlDataSource3" DataTextField="TagName" DataValueField="ID">
        </asp:CheckBoxList>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [ID], [TagName] FROM [Tags]"></asp:SqlDataSource>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Save Tag" />
    </p>
</asp:Content>
